$(function () {
    $(".head").load("header.html");
    $("#foot").load("footer.html");


    //获取订单列表
    var store = localStorage.getItem("pid");
    if (store) {
        var shoplist = [];
        var list = JSON.parse(store);
        //console.log("list",list);
        var alllist = jsonData.all_scenice;

        alllist.forEach(function (item) {
            list.forEach(function (pidobj) {
                if (item.pid == pidobj.pid) {
                    item.date = pidobj.date;
                    shoplist.push(item);
                }
            });
        });

        console.log(shoplist);
        $(".shoplist").remove();
        var str = "";
        shoplist.forEach(function (item, index) {
            var price = item.group_price == '0' ? item.price : item.group_price;
            str += "<ul class='shoplist'>" +
                "<li class='xh'>" + parseInt(index * 1 + 1) + "</li>" +
                "<li class='lx'>" +
                "	<div class='order-container'>" +
                "		<ul>" +
                "			<li><img src='img/" + item.picture + ".png' width='87' height='58' /></li>" +
                "			<li>" +
                "				<div class='order-info'>" +
                "					<a href='detail.html'>产品编号："+ item.pid +" </a>" +
                "					<a href='detail.html'>线路名：" + item.name + "</a>" +
                "				</div>" +
                "			</li>" +
                "		</ul>" +
                "	</div>" +
                "</li>" +
                "<li class='rs'>￥" + price + "</li>" +
                "<li class='dj'><a href='order.html'>" + item.date + "</a></li>" +
                "<li class='cz'><a href='#' class='btnDel'><span style='color:#F60; text-decoration:underline;'></span></a>" +
                "</li>" +
                "</ul>";
        });
        $("#shop-xx").append(str);
    }

});
